<table>
    <thead>
        <tr>
            <th>项目</th>
            <th>金额</th>
        </tr>
    </thead>
    <tbody>
        @foreach($data as $k => $v)
            <tr>
                <td>{{$pay_type[$k]}}</td>
                <td>{{$v->sum('price')}}</td>
            </tr>
        @endforeach
    </tbody>
</table>